SetPromiseValue
TheSetPromiseValue
method writes data to the specified value of the focused property, creating the value if it doesn't exist and making the value a promise value.
void SetPromiseValue (in ODValueType valueType, in ODULong offset, in ODByteArray value, in ODPart sourcePart);
valueType
- The type of the value where the promise data is to be written.
offset
- The offset at which the promise data is to be stored, expressed as an unsigned 32-bit number of bytes from the beginning of the value.
value
- A byte array whose buffer contains the promise data to be written.
sourcePart
- A reference to the part that made the promise.
DISCUSSION
You call this method to write a promise for a value of the specified type in the focused property. You may call this method multiple times to promise values of different types or to write to different offsets in the same value.This method writes data to the specified value, starting at the specified offset (inclusive), and overwrites any data at and beyond the offset. If the current offset plus the length of data being written is greater than the current size of the value (as returned by the
GetSize
method), the size of the value is automatically increased to accommodate the new data.When you no longer need the structure you pass as the
value
parameter, you should deallocate that structure and its buffer.EXCEPTIONS
If the storage-unit cursor for this storage-unit view does not represent a legal focus context for the storage unit that created this storage-unit view, this method throws exceptions raised by the
kODErrIllegalNullValueTypeInput
- The specified value type is null.
kODErrInvalidValueType
- The specified value type is improperly formed or illegal.
kODErrUnfocusedStorageUnit
- The focus context of this storage-unit view is not a property or a value.
FocusWithCursor
method of that storage unit.SEE ALSO
TheODByteArray
type (page 877).
TheODValueType
type (page 904).
TheODStorageUnitView::GetPromiseValue
method (page 739).
TheODStorageUnitView::GetSize
method (page 742).
TheODStorageUnitView::IsPromiseValue
method (page 750).
Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help